#include  <iostream>
#include<stdio.h> 
using namespace std;

int YangTriangle(int x, int y)
{
    int z;
    if ( (y == 0) || (y == x) ) {
        z = 1;
    } else {
        z = YangTriangle(x-1, y-1) + YangTriangle(x-1, y);
    }
    return z;
}
int main()
{
	int n;
	while( scanf("%d",&n)!=EOF )
	{
		 for(int i = 1; i < n; i++) 
		 {
			 for(int j = 0; j <= i; j++)
				 printf( "%d ",YangTriangle(i,j) );//cout<<YangTriangle(i,j)<<" ";
		     printf("\n");
		 }
	}
	//system("pause");
	return 0;
}
